<template>
	<view>
	<view class="navbox">
		<image src="/static/images/tabbar/back.png" v-if="navzuo" @tap="navout"></image>
		<image v-else></image>
		<view class="navbar"><slot></slot></view>
		<image src="/static/images/tabbar/back.png" v-if="navyou"></image>
		<image v-else ></image>
	</view>
	</view>
</template>

<script>
	export default {
		props:{
			navzuo:{
				type:Boolean,
				default:false
			},
			navyou:{
				type:Boolean,
				default:false
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			navout(){
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.navbox{
	display: flex;
	box-shadow: 0 1px 1px rgba(100,100,100,.1);
	background: linear-gradient(to right,#3388ee, #4db9f1);
	height: 10vh;
	line-height: 10vh;
	justify-content: center;
	align-items: center;
	color: #F8F8F8;
		>image{
			width: 50rpx;
			height: 50rpx;
			padding: 0 50rpx;
		}
.navbar{
	  flex:1;
		text-align: center;
}
}
</style>
